import {createRouter, createWebHistory} from 'vue-router'
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'home',
            component: () => import('../views/layout/index.vue'),//结构
            redirect: '/index',
            children: [
                {
                    path: 'index',
                    name: 'index',
                    component: () => import('../views/index/index.vue') //工作台
                },
                {
                    path: 'catalogOne/menuOne',
                    name: 'catalogOneMenuOne',
                    component: () => import('../views/catalogOne/menuOne.vue') //目录一菜单一
                },
                {
                    path: 'catalogOne/menuTwo',
                    name: 'catalogOneMenuTwo',
                    component: () => import('../views/catalogOne/menuTwo.vue') //目录一菜单二
                },
                {
                    path: 'catalogTwo/menuOne',
                    name: 'catalogTwoMenuOne',
                    component: () => import('../views/catalogTwo/menuOne.vue') //目录二菜单一
                },
                {
                    path: 'catalogTwo/menuTwo',
                    name: 'catalogTwoMenuTwo',
                    component: () => import('../views/catalogTwo/menuTwo.vue') //目录二菜单二
                },
                {
                    path: 'catalogThree/menuOne',
                    name: 'catalogThreeMenuOne',
                    component: () => import('../views/catalogThree/menuOne.vue') //目录三菜单一
                },
                {
                    path: 'catalogThree/menuTwo',
                    name: 'catalogThreeMenuTwo',
                    component: () => import('../views/catalogThree/menuTwo.vue') //目录三菜单二
                }
            ]
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('../views/login/login.vue') //登录
        }
    ]
})
export default router
